package com.hotel.management;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * 酒店管理系统主启动类
 * 
 * @author Hotel Management Team
 * @version 1.0.0
 * @since 2024-06-27
 */
@SpringBootApplication(exclude = {SecurityAutoConfiguration.class})
@EnableTransactionManagement
@MapperScan("com.hotel.management.mapper")
public class HotelManagementApplication {

    public static void main(String[] args) {
        // 设置系统属性
        System.setProperty("spring.devtools.restart.enabled", "true");
        System.setProperty("spring.devtools.livereload.enabled", "true");
        
        // 启动Spring Boot应用
        SpringApplication application = new SpringApplication(HotelManagementApplication.class);
        
        // 设置默认配置
        application.setAdditionalProfiles("dev");
        
        // 启动应用
        application.run(args);
        
        // 输出启动成功信息
        System.out.println("\n" +
                "========================================\n" +
                "  酒店管理系统启动成功！\n" +
                "  访问地址: http://localhost:8080/api\n" +
                "  API文档: http://localhost:8080/api/doc.html\n" +
                "  监控面板: http://localhost:8080/api/actuator\n" +
                "  数据库监控: http://localhost:8080/api/druid\n" +
                "========================================\n");
    }
}
